package com.scvtc.domain.enums;

/**
 * @Description: 项目响应信息
 * @Author: yiFei
 * @date: 2022/3/3 19:49
 */
public enum AppHttpCodeEnum {

    SUCCESS(20000, "操作成功"),
    LOGIN_SUCCESS(20001, "登录成功"),
    LOGOUT_SUCCESS(20002, "登出成功"),
    FILE_UPLOAD_SUCCESS(20002, "文件上传成功"),
    FAIL(50000, "操作失败"),
    BAD_CREDENTIALS(50001, "密码错误"),
    NEED_LOGIN(50002, "未登录"),
    FAIL_AUTHENTICATION(50003, "用户信息错误"),
    USER_NOT_FIND(50004, "用户名密码错误"),
    OPERATE_TIME_OUT(50005, "长时间未操作,请重新登录"),
    USER_EXIST(50006, "用户已存在"),
    INSUFFICIENT_PERMISSIONS(50007, "权限不足"),
    DATA_REPEAT(50008, "信息重复"),
    FILE_SUFFIX_ERROR(50009, "文件后缀不匹配"),
    FILE_UPLOAD_ERROR(50010, "文件上传错误"),
    SERVER_ERROR(50011, "服务器错误"),
    MISSING_USER_ROLE(50012, "用户至少拥有一个角色"),
    MISSING_ROLE_MENU(50013, "角色至少拥有一个菜单"),
    STUDENT_DOES_NOT_EXIST(50014,"学生不存在"),
    TEACHER_DOES_NOT_EXIST(50015,"教师不存在");


    private Integer code;
    private String msg;

    AppHttpCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
